home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Libraries / DCLAP 6d / dclap6d / network / nsclilib / ni_encrs.c < prev    next >
Text File  |  1996-07-05  |  4KB  |  96 lines

  1. /*
  2. * ===========================================================================
  3. *
  4. *                            PUBLIC DOMAIN NOTICE
  5. *               National Center for Biotechnology Information
  6. *
  7. *  This software/database is a "United States Government Work" under the
  8. *  terms of the United States Copyright Act.  It was written as part of
  9. *  the author's official duties as a United States Government employee and
  10. *  thus cannot be copyrighted.  This software/database is freely available
  11. *  to the public for use. The National Library of Medicine and the U.S.
  12. *  Government have not placed any restriction on its use or reproduction.
  13. *
  14. *  Although all reasonable efforts have been taken to ensure the accuracy
  15. *  and reliability of the software and data, the NLM and the U.S.
  16. *  Government do not and cannot warrant the performance or results that
  17. *  may be obtained by using this software or data. The NLM and the U.S.
  18. *  Government disclaim all warranties, express or implied, including
  19. *  warranties of performance, merchantability or fitness for any particular
  20. *  purpose.
  21. *
  22. *  Please cite the author in any work or product based on this material.
  23. *
  24. * ===========================================================================
  25. *
  26. * File Name:    ni_encrs.c
  27. *
  28. * Author:       Epstein
  29. *
  30. * Version Creation Date:        2/14/94
  31. *
  32. * $Revision: 4.0 $
  33. *
  34. * File Description:
  35. *   Stub replacement for ni_encr.c.  This makes it easy to build NCBI Network
  36. *   Services tools either with or without encryption support.
  37. *
  38. * Modifications:
  39. * --------------------------------------------------------------------------
  40. * Date     Name        Description of modification
  41. * -------  ----------  -----------------------------------------------------
  42. * 2/15/94  Epstein     Replaced nice macro with explicit definitions, due to
  43. *                      inconsistency involving C pre-processors.
  44. *
  45. *
  46. * RCS Modification History:
  47. * $Log: ni_encrs.c,v $
  48.  * Revision 4.0  1995/07/26  13:56:32  ostell
  49.  * force revision to 4.0
  50.  *
  51.  * Revision 1.5  1995/05/17  17:52:06  epstein
  52.  * add RCS log revision history
  53.  *
  54. */
  55.  
  56. #include <ncbi.h>
  57. #include <ni_types.h>
  58.  
  59.  
  60. /* this is the only function which may be called legally */
  61. Boolean LIBCALL NI_EncrAvailable (void)
  62. { return FALSE; }
  63.  
  64. Boolean LIBCALL NI_SetupDESEncryption (NI_HandPtr mh, UcharPtr desKey)
  65. { ErrPostEx(SEV_ERROR,0,0,"Invalid call to encryption function NI_SetupDESEncryption"); return FALSE; }
  66.  
  67. Boolean LIBCALL NI_PubKeysEqual (NI_PubKeyPtr x, NI_PubKeyPtr y)
  68. { ErrPostEx(SEV_ERROR,0,0,"Invalid call to encryption function NI_PubKeysEqual"); return FALSE; }
  69.  
  70. void NI_GenerateDESKey (UcharPtr desKey)
  71. { ErrPostEx(SEV_ERROR,0,0,"Invalid call to encryption function NI_GenerateDESKey"); }
  72.  
  73. Boolean LIBCALL NI_GenAndWritePEMKeys (Int2 bits, AsnIoPtr pubAip, FILE *privFp)
  74. { ErrPostEx(SEV_ERROR,0,0,"Invalid call to encryption function NI_GenAndWritePEMKeys"); return FALSE; }
  75.  
  76. Boolean LIBCALL NI_WritePubKeyToConfig (NI_PubKeyPtr pub)
  77. { ErrPostEx(SEV_ERROR,0,0,"Invalid call to encryption function NI_WritePubKeyToConfig"); return FALSE; }
  78.  
  79. NI_PubKeyPtr LIBCALL NI_ReadPubKeyFromConfig (void)
  80. { ErrPostEx(SEV_ERROR,0,0,"Invalid call to encryption function NI_ReadPubKeyFromConfig"); return NULL; }
  81.  
  82. NI_PubKeyPtr LIBCALL NI_PubKeyDup (NI_PubKeyPtr orig)
  83. { ErrPostEx(SEV_ERROR,0,0,"Invalid call to encryption function NI_PubKeyDup"); return NULL; }
  84.  
  85. VoidPtr LIBCALL NI_LoadPrivKey (FILE *fp, Int2Ptr privKeyLenPtr)
  86. { ErrPostEx(SEV_ERROR,0,0,"Invalid call to encryption function NI_LoadPrivKey"); return NULL; }
  87.  
  88. Int2 LIBCALL NI_PubKeyDecrypt (VoidPtr pKey, UcharPtr PNTR plainText, UcharPtr cipherText, Int2 cipherTextLen)
  89. { ErrPostEx(SEV_ERROR,0,0,"Invalid call to encryption function NI_PubKeyDecrypt"); return -1; }
  90.  
  91. Int2 LIBCALL NI_PubKeyEncrypt (NI_PubKeyPtr pub, UcharPtr plainText, Int2 plainTextLen, UcharPtr PNTR cipherText)
  92. { ErrPostEx(SEV_ERROR,0,0,"Invalid call to encryption function NI_PubKeyDecrypt"); return -1; }
  93.  
  94. void NI_DestroyEncrStruct (NI_EncrDataPtr encr)
  95. { ErrPostEx(SEV_ERROR,0,0,"Invalid call to encryption function NI_DestroyEncrStruct"); }
  96.